<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .parent{
            width:200px;
            background: red;
            /* overflow: hidden; */
        }
        .child{
            width:100px;
            height: 100px;
            background: blue;
            float: left;
        }
        /* .clear{
            clear: both;
        } */
        .parent::after{
            content:"";
            display: table;
            clear: both;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="child">

        </div>
        <!-- <div class="clear"></div> -->
    </div>  
</body>
</html>